package store;

import java.util.ArrayList;
import java.util.List;

public class DataStore {
	
	public static List orderList = new ArrayList();
	
	public void addOrder(Order order){
		orderList.add(order);
	}
	
	public void deleteOrder(String orderid){
		for (int i = 0; i< orderList.size(); i++){
			Order order = (Order)orderList.get(i);
			if (order.getOrderid().equals(orderid)){
				orderList.remove(i);
			}
		}
	}
	
	public void finishOrder(String orderid){
		for (int i = 0; i< orderList.size(); i++){
			Order order = (Order)orderList.get(i);
			if (order.getOrderid().equals(orderid)){
				order.setFinished(true);
			}
		}
	}

}
